@examplary/ui 1.55.0 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ai/ai-icon.js +2 -25
- package/dist/components/ai/ai-prompt-suggestion.js +3 -26
- package/dist/components/brand/tick-icon.js +2 -25
- package/dist/components/chat/chat-input.js +8 -31
- package/dist/components/chat/chat-typing-indicator.js +2 -2
- package/dist/components/chat/chat-view.js +6 -34
- package/dist/components/loading/ai-spinner.js +2 -13
- package/dist/components/loading/tick-loader.js +39 -104
- package/dist/components/print/answer-box.js +2 -25
- package/dist/components/question-types/fetch-component.js +65 -106
- package/dist/components/question-types/format-question-type.d.ts +41 -41
- package/dist/components/question-types/format-question-type.js +36 -37
- package/dist/components/rich-text/minimal-rich-text-field.d.ts +2 -2
- package/dist/components/rich-text/minimal-rich-text-field.js +47 -85
- package/dist/components/rich-text/rich-text-display.js +15 -33
- package/dist/components/rich-text/rich-text-field.js +2 -25
- package/dist/components/rich-text/rich-text-toolbar.d.ts +3 -2
- package/dist/components/rich-text/rich-text-toolbar.js +5 -6
- package/dist/components/rich-text/tiptap/collaboration-caret.js +24 -34
- package/dist/components/rich-text/tiptap/comments/comment-bubble.d.ts +1 -1
- package/dist/components/rich-text/tiptap/comments/comment-bubble.js +36 -41
- package/dist/components/rich-text/tiptap/content-reference.js +6 -7
- package/dist/components/rich-text/tiptap/crop-page-clipping-modal.d.ts +3 -3
- package/dist/components/rich-text/tiptap/crop-page-clipping-modal.js +20 -25
- package/dist/components/rich-text/tiptap/extensions.d.ts +2 -2
- package/dist/components/rich-text/tiptap/extensions.js +6 -16
- package/dist/components/rich-text/tiptap/file-attachment.js +9 -11
- package/dist/components/rich-text/tiptap/file-handler.d.ts +2 -2
- package/dist/components/rich-text/tiptap/file-handler.js +110 -185
- package/dist/components/rich-text/tiptap/image.js +18 -23
- package/dist/components/rich-text/tiptap/mathematics-component.js +25 -30
- package/dist/components/rich-text/tiptap/mathematics.js +56 -82
- package/dist/components/rich-text/tiptap/page-clipping.js +3 -4
- package/dist/components/rich-text/tiptap/png-scanner.js +63 -108
- package/dist/components/rich-text/tiptap/rich-text-formatting-menu.d.ts +1 -1
- package/dist/components/rich-text/tiptap/rich-text-formatting-menu.js +31 -46
- package/dist/components/ui/alert.d.ts +3 -3
- package/dist/components/ui/alert.js +7 -32
- package/dist/components/ui/avatar.js +18 -14
- package/dist/components/ui/badge.d.ts +3 -3
- package/dist/components/ui/badge.js +4 -27
- package/dist/components/ui/button.d.ts +4 -4
- package/dist/components/ui/button.js +4 -27
- package/dist/components/ui/card.js +6 -46
- package/dist/components/ui/checkbox.js +1 -26
- package/dist/components/ui/color-picker.js +11 -22
- package/dist/components/ui/command-palette.d.ts +2 -2
- package/dist/components/ui/command-palette.js +38 -72
- package/dist/components/ui/command.js +18 -49
- package/dist/components/ui/comments.js +37 -107
- package/dist/components/ui/context-menu.js +30 -67
- package/dist/components/ui/dialog.js +15 -61
- package/dist/components/ui/dropdown.js +17 -64
- package/dist/components/ui/floating-menu.js +2 -25
- package/dist/components/ui/floating-resizable.d.ts +5 -0
- package/dist/components/ui/floating-resizable.js +24 -0
- package/dist/components/ui/help-icon.js +1 -2
- package/dist/components/ui/icon-picker.js +50 -130
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/input.js +2 -25
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.js +2 -27
- package/dist/components/ui/popover.d.ts +2 -2
- package/dist/components/ui/popover.js +4 -32
- package/dist/components/ui/progress-bar.js +2 -3
- package/dist/components/ui/radio-group.js +4 -28
- package/dist/components/ui/resizable.d.ts +6 -9
- package/dist/components/ui/resizable.js +13 -60
- package/dist/components/ui/select.js +12 -55
- package/dist/components/ui/separator.js +1 -26
- package/dist/components/ui/sheet.d.ts +3 -3
- package/dist/components/ui/sheet.js +11 -51
- package/dist/components/ui/skeleton.js +2 -25
- package/dist/components/ui/slider.js +7 -32
- package/dist/components/ui/sortable.d.ts +1 -1
- package/dist/components/ui/sortable.js +131 -155
- package/dist/components/ui/switch.d.ts +3 -3
- package/dist/components/ui/switch.js +3 -28
- package/dist/components/ui/table.js +8 -54
- package/dist/components/ui/tabs.js +8 -34
- package/dist/components/ui/text-selection-menu.d.ts +1 -1
- package/dist/components/ui/text-selection-menu.js +19 -25
- package/dist/components/ui/textarea.js +7 -30
- package/dist/components/ui/tooltip.js +4 -29
- package/dist/components/web-components/content-reference.js +81 -106
- package/dist/components/web-components/file-attachment.js +9 -30
- package/dist/components/web-components/index.js +1 -1
- package/dist/components/web-components/inline-comment-reply.js +3 -24
- package/dist/components/web-components/inline-comment.js +3 -24
- package/dist/components/web-components/inline-math.js +14 -36
- package/dist/components/web-components/page-clipping.js +13 -34
- package/dist/lib/compose-refs.js +10 -18
- package/dist/lib/use-spin-loop.js +19 -69
- package/dist/src/global.css +2 -2
- package/dist/utils.js +1 -5
- package/package.json +7 -6
- package/src/global.css +6 -1
- package/dist/components/rich-text/tiptap/comments/comment-reply.d.ts +0 -21
- package/dist/components/rich-text/tiptap/comments/comment-reply.js +0 -230
- package/dist/components/rich-text/tiptap/comments/comment.d.ts +0 -22
- package/dist/components/rich-text/tiptap/comments/comment.js +0 -199
- package/dist/components/rich-text/tiptap/comments/helpers.d.ts +0 -19
- package/dist/components/rich-text/tiptap/comments/helpers.js +0 -95
- package/dist/components/rich-text/tiptap/comments/types.d.ts +0 -29
- package/dist/components/rich-text/tiptap/comments/types.js +0 -1
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
return (_jsx("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: _jsx("path", { d: "M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM8.36621 3.70703C8.16407 3.5049 7.83594 3.50492 7.63379 3.70703L7.55469 3.78613C6.88523 5.5116 5.51162 6.88527 3.78613 7.55469L3.70703 7.63379C3.50492 7.83594 3.5049 8.16407 3.70703 8.36621L3.78516 8.44434C5.51093 9.11363 6.88511 10.4882 7.55469 12.2139L7.63379 12.293C7.83594 12.495 8.16409 12.495 8.36621 12.293L8.44434 12.2139C9.11375 10.4881 10.4881 9.11379 12.2139 8.44434L12.293 8.36621C12.495 8.16409 12.495 7.83594 12.293 7.63379L12.2139 7.55469C10.4882 6.88511 9.11363 5.51093 8.44434 3.78516L8.36621 3.70703Z", fill: "currentColor" }) })));
|
|
2
|
+
export const AiIcon = ({ ...props }) => {
|
|
3
|
+
return (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsx("path", { d: "M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM8.36621 3.70703C8.16407 3.5049 7.83594 3.50492 7.63379 3.70703L7.55469 3.78613C6.88523 5.5116 5.51162 6.88527 3.78613 7.55469L3.70703 7.63379C3.50492 7.83594 3.5049 8.16407 3.70703 8.36621L3.78516 8.44434C5.51093 9.11363 6.88511 10.4882 7.55469 12.2139L7.63379 12.293C7.83594 12.495 8.16409 12.495 8.36621 12.293L8.44434 12.2139C9.11375 10.4881 10.4881 9.11379 12.2139 8.44434L12.293 8.36621C12.495 8.16409 12.495 7.83594 12.293 7.63379L12.2139 7.55469C10.4882 6.88511 9.11363 5.51093 8.44434 3.78516L8.36621 3.70703Z", fill: "currentColor" }) }));
|
|
27
4
|
};
|
|
@@ -1,31 +1,8 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
2
|
import { AiIcon } from "./ai-icon";
|
|
25
3
|
import { cn } from "../../utils";
|
|
26
4
|
import { Button } from "../ui";
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"bg-fuchsia-400 hover:bg-fuchsia-400 text-white [&>svg]:text-white/80! disabled:opacity-100", className) }, props, { children: [_jsx(AiIcon, { className: "text-fuchsia-400 group-hover:text-fuchsia-500 transition mr-0.5" }), children] })));
|
|
5
|
+
export const AiPromptSuggestion = ({ children, className, active, ...props }) => {
|
|
6
|
+
return (_jsxs(Button, { size: "sm", variant: "secondary", className: cn("pl-2 pr-3 py-1 h-auto group", !active && "bg-fuchsia-100 hover:bg-fuchsia-200", active &&
|
|
7
|
+
"bg-fuchsia-400 hover:bg-fuchsia-400 text-white [&>svg]:text-white/80! disabled:opacity-100", className), ...props, children: [_jsx(AiIcon, { className: "text-fuchsia-400 group-hover:text-fuchsia-500 transition mr-0.5" }), children] }));
|
|
31
8
|
};
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
return (_jsx("svg", __assign({ width: "59", height: "59", viewBox: "0 0 59 59", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: _jsxs("g", { children: [_jsx("path", { d: "M6.5594 27.9821C9.68499 24.8565 14.6666 24.7705 17.6862 27.7901L28.9736 39.0776C31.9932 42.0971 31.9072 47.0787 28.7816 50.2043C25.6561 53.3299 20.6744 53.4159 17.6549 50.3963L6.3674 39.1088C3.34785 36.0893 3.43381 31.1077 6.5594 27.9821Z", fill: "black", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" }), _jsx("path", { d: "M18.1084 50.8262C14.9832 47.7011 15.0372 42.5802 18.229 39.3884L44.0524 13.5649C47.2442 10.3731 52.3651 10.3191 55.4903 13.4443C58.6154 16.5695 58.5614 21.6904 55.3697 24.8822L29.5462 50.7056C26.3544 53.8974 21.2335 53.9514 18.1084 50.8262Z", fill: "black", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" }), _jsx("path", { d: "M4.3594 23.1631C7.48499 20.0375 12.5526 20.0375 15.6782 23.1631L27.362 34.847C30.4876 37.9726 30.4876 43.0402 27.3621 46.1658C24.2365 49.2913 19.1689 49.2913 16.0433 46.1658L4.35941 34.4819C1.23382 31.3563 1.23381 26.2887 4.3594 23.1631Z", className: "fill-white", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" }), _jsx("path", { d: "M4.3594 23.1631C7.48499 20.0375 12.5526 20.0375 15.6782 23.1631L27.362 34.847C30.4876 37.9726 30.4876 43.0402 27.3621 46.1658C24.2365 49.2913 19.1689 49.2913 16.0433 46.1658L4.35941 34.4819C1.23382 31.3563 1.23381 26.2887 4.3594 23.1631Z", className: "fill-bright opacity-30", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" }), _jsx("path", { d: "M17.0091 47.527C13.8835 44.4014 13.8835 39.3338 17.0091 36.2082L42.2971 10.9202C45.4227 7.79463 50.4903 7.79463 53.6159 10.9202C56.7415 14.0458 56.7415 19.1134 53.6159 22.239L28.3279 47.527C25.2023 50.6526 20.1347 50.6526 17.0091 47.527Z", className: "fill-bright", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" })] }) })));
|
|
2
|
+
export const TickIcon = ({ ...props }) => {
|
|
3
|
+
return (_jsx("svg", { width: "59", height: "59", viewBox: "0 0 59 59", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: _jsxs("g", { children: [_jsx("path", { d: "M6.5594 27.9821C9.68499 24.8565 14.6666 24.7705 17.6862 27.7901L28.9736 39.0776C31.9932 42.0971 31.9072 47.0787 28.7816 50.2043C25.6561 53.3299 20.6744 53.4159 17.6549 50.3963L6.3674 39.1088C3.34785 36.0893 3.43381 31.1077 6.5594 27.9821Z", fill: "black", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" }), _jsx("path", { d: "M18.1084 50.8262C14.9832 47.7011 15.0372 42.5802 18.229 39.3884L44.0524 13.5649C47.2442 10.3731 52.3651 10.3191 55.4903 13.4443C58.6154 16.5695 58.5614 21.6904 55.3697 24.8822L29.5462 50.7056C26.3544 53.8974 21.2335 53.9514 18.1084 50.8262Z", fill: "black", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" }), _jsx("path", { d: "M4.3594 23.1631C7.48499 20.0375 12.5526 20.0375 15.6782 23.1631L27.362 34.847C30.4876 37.9726 30.4876 43.0402 27.3621 46.1658C24.2365 49.2913 19.1689 49.2913 16.0433 46.1658L4.35941 34.4819C1.23382 31.3563 1.23381 26.2887 4.3594 23.1631Z", className: "fill-white", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" }), _jsx("path", { d: "M4.3594 23.1631C7.48499 20.0375 12.5526 20.0375 15.6782 23.1631L27.362 34.847C30.4876 37.9726 30.4876 43.0402 27.3621 46.1658C24.2365 49.2913 19.1689 49.2913 16.0433 46.1658L4.35941 34.4819C1.23382 31.3563 1.23381 26.2887 4.3594 23.1631Z", className: "fill-bright opacity-30", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" }), _jsx("path", { d: "M17.0091 47.527C13.8835 44.4014 13.8835 39.3338 17.0091 36.2082L42.2971 10.9202C45.4227 7.79463 50.4903 7.79463 53.6159 10.9202C56.7415 14.0458 56.7415 19.1134 53.6159 22.239L28.3279 47.527C25.2023 50.6526 20.1347 50.6526 17.0091 47.527Z", className: "fill-bright", stroke: "black", strokeWidth: "2.31", strokeMiterlimit: "16", strokeLinejoin: "round" })] }) }));
|
|
27
4
|
};
|
|
@@ -1,50 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
3
|
import { useState } from "react";
|
|
26
4
|
import { SendIcon } from "lucide-react";
|
|
27
5
|
import { cn } from "../../utils";
|
|
28
|
-
export
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var el = e.target;
|
|
6
|
+
export const ChatInput = ({ loading = false, autoFocus = true, submit, placeholder = "", ...props }) => {
|
|
7
|
+
const [value, setValue] = useState("");
|
|
8
|
+
return (_jsxs("div", { className: cn("rounded-[26px]! w-full text-sm mt-2 box flex justify-between items-end", loading ? "bg-gray-100 cursor-not-allowed" : "bg-white"), children: [_jsx("textarea", { disabled: loading, autoFocus: autoFocus, className: "pl-5.5 pr-2 py-3.5 text-sm flex-1 resize-none outline-0 h-[3rem]", placeholder: placeholder, value: value, onChange: (e) => setValue(e.target.value), onInput: (e) => {
|
|
9
|
+
const el = e.target;
|
|
33
10
|
if (el.value.trim().length) {
|
|
34
|
-
el.style.height =
|
|
11
|
+
el.style.height = `${el.scrollHeight}px`;
|
|
35
12
|
}
|
|
36
13
|
else {
|
|
37
14
|
el.style.height = "3rem";
|
|
38
15
|
}
|
|
39
|
-
}, onKeyDown:
|
|
16
|
+
}, onKeyDown: (e) => {
|
|
40
17
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
41
18
|
e.preventDefault();
|
|
42
19
|
submit(value.trim());
|
|
43
20
|
setValue("");
|
|
44
21
|
}
|
|
45
|
-
}
|
|
22
|
+
}, ...props }, "input"), _jsx("button", { className: cn("border border-black bg-emerald-500 flex items-center justify-center rounded-full size-9 m-1.5 text-white", loading
|
|
46
23
|
? "cursor-not-allowed"
|
|
47
|
-
: "hover:bg-emerald-600 cursor-pointer"), onClick:
|
|
24
|
+
: "hover:bg-emerald-600 cursor-pointer"), onClick: () => {
|
|
48
25
|
if (loading || !value.trim())
|
|
49
26
|
return;
|
|
50
27
|
submit(value.trim());
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { motion } from "motion/react";
|
|
4
|
-
export
|
|
4
|
+
export const ChatTypingIndicator = () => (_jsx("div", { className: "flex items-center gap-1.25 pl-1", children: [0, 1, 2].map((i) => (_jsx(motion.span, { className: "size-1.75 rounded-full bg-black/20", animate: { y: [0, -6, 0], opacity: [0.4, 1, 0.4] }, transition: {
|
|
5
5
|
duration: 0.9,
|
|
6
6
|
repeat: Infinity,
|
|
7
7
|
delay: i * 0.18,
|
|
8
8
|
ease: "easeInOut",
|
|
9
|
-
} }, i))
|
|
9
|
+
} }, i))) }));
|
|
@@ -1,26 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
3
|
import { Fragment, useMemo } from "react";
|
|
26
4
|
import { CheckCircle2Icon, MoreHorizontalIcon, SparkleIcon, TriangleAlertIcon, } from "lucide-react";
|
|
@@ -30,19 +8,13 @@ import { TickIcon } from "../brand/tick-icon";
|
|
|
30
8
|
import { RichTextDisplay } from "../rich-text/rich-text-display";
|
|
31
9
|
import { Button } from "../ui/button";
|
|
32
10
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "../ui/dropdown";
|
|
33
|
-
export
|
|
34
|
-
|
|
35
|
-
var assistantIcon = useMemo(function () {
|
|
11
|
+
export const ChatView = ({ messages, typing = false, showTeacherContext = false, botAvatar, className, reportError, bubbleClassName, ...props }) => {
|
|
12
|
+
const assistantIcon = useMemo(() => {
|
|
36
13
|
return botAvatar ? (_jsx("img", { src: botAvatar, alt: "Bot Avatar", className: "size-7 rounded-full border border-black bg-white shrink-0" })) : (_jsx("div", { className: "size-7 rounded-full border border-black bg-white flex items-center justify-center shrink-0", children: _jsx(TickIcon, { className: "size-4" }) }));
|
|
37
14
|
}, [botAvatar]);
|
|
38
|
-
return (_jsxs("div",
|
|
39
|
-
.filter(
|
|
40
|
-
|
|
41
|
-
return role !== "system" && !hidden;
|
|
42
|
-
})
|
|
43
|
-
.map(function (item, index) { return (_jsxs(Fragment, { children: [_jsxs("div", { className: "flex gap-3 w-full", children: [item.role === "assistant" && assistantIcon, _jsxs("div", { className: cn("text-sm flex gap-1 group", "max-w-[85%] border rounded-3xl px-4 py-3", "animate-in slide-in-from-top", item.role === "user" &&
|
|
15
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-3 items-start", className), ...props, children: [messages
|
|
16
|
+
.filter(({ role, hidden }) => role !== "system" && !hidden)
|
|
17
|
+
.map((item, index) => (_jsxs(Fragment, { children: [_jsxs("div", { className: "flex gap-3 w-full", children: [item.role === "assistant" && assistantIcon, _jsxs("div", { className: cn("text-sm flex gap-1 group", "max-w-[85%] border rounded-3xl px-4 py-3", "animate-in slide-in-from-top", item.role === "user" &&
|
|
44
18
|
"bg-white border-border ml-auto rounded-tr-sm", item.role !== "user" &&
|
|
45
|
-
"border-transparent bg-chat-background rounded-tl-sm", bubbleClassName), children: [_jsx(RichTextDisplay, { children: item.content }), reportError && item.traceIds && item.traceIds.length > 0 && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "roundedSecondary", size: "icon-sm", className: "outline-none size-6! p-0! opacity-0 focus-within:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100 bg-border active:bg-border hover:bg-border ring-0! -m-2 -mt-1.5 ml-0", children: _jsx(MoreHorizontalIcon, { className: "size-3.5!" }) }) }), _jsx(DropdownMenuContent, { align: "end", children: _jsxs(DropdownMenuItem, { className: "text-amber-600", onClick:
|
|
46
|
-
return reportError({ traceIds: item.traceIds });
|
|
47
|
-
}, children: [_jsx(TriangleAlertIcon, {}), "Report AI response"] }) })] }))] })] }), showTeacherContext && item.reason ? (_jsxs("div", { className: cn("text-xs text-gray-500 mb-1 max-w-[85%]"), children: [_jsx(SparkleIcon, { className: "size-3 -mt-0.5 inline-block mr-1", strokeWidth: 2.5 }), _jsx("span", { className: "font-semibold", children: "Reasoning:" }), " ", item.reason] }, "reason-".concat(index))) : null, showTeacherContext && item.completed && item.completionReason ? (_jsxs("div", { className: cn("text-xs text-gray-500 mb-1 max-w-[85%]"), children: [_jsxs("span", { className: "font-semibold text-emerald-600", children: [_jsx(CheckCircle2Icon, { className: "size-3 -mt-0.5 inline-block mr-1", strokeWidth: 2.6 }), "Completion reasoning:"] }), " ", item.completionReason] })) : null] }, index)); }), typing && (_jsxs("div", { className: "flex gap-3 w-full", children: [assistantIcon, _jsx(ChatTypingIndicator, {})] }))] })));
|
|
19
|
+
"border-transparent bg-chat-background rounded-tl-sm", bubbleClassName), children: [_jsx(RichTextDisplay, { children: item.content }), reportError && item.traceIds && item.traceIds.length > 0 && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "roundedSecondary", size: "icon-sm", className: "print:hidden outline-none size-6! p-0! opacity-0 focus-within:opacity-100 group-focus-within:opacity-100 group-hover:opacity-100 data-[state=open]:opacity-100 bg-border active:bg-border hover:bg-border ring-0! -m-2 -mt-1.5 ml-0", children: _jsx(MoreHorizontalIcon, { className: "size-3.5!" }) }) }), _jsx(DropdownMenuContent, { align: "end", children: _jsxs(DropdownMenuItem, { className: "text-amber-600", onClick: () => reportError({ traceIds: item.traceIds }), children: [_jsx(TriangleAlertIcon, {}), "Report AI response"] }) })] }))] })] }), showTeacherContext && item.reason ? (_jsxs("div", { className: cn("text-xs text-gray-500 mb-1 max-w-[85%]"), children: [_jsx(SparkleIcon, { className: "size-3 -mt-0.5 inline-block mr-1", strokeWidth: 2.5 }), _jsx("span", { className: "font-semibold", children: "Reasoning:" }), " ", item.reason] }, `reason-${index}`)) : null, showTeacherContext && item.completed && item.completionReason ? (_jsxs("div", { className: cn("text-xs text-gray-500 mb-1 max-w-[85%]"), children: [_jsxs("span", { className: "font-semibold text-emerald-600", children: [_jsx(CheckCircle2Icon, { className: "size-3 -mt-0.5 inline-block mr-1", strokeWidth: 2.6 }), "Completion reasoning:"] }), " ", item.completionReason] })) : null] }, index))), typing && (_jsxs("div", { className: "flex gap-3 w-full", children: [assistantIcon, _jsx(ChatTypingIndicator, {})] }))] }));
|
|
48
20
|
};
|
|
@@ -1,20 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
3
|
import { motion } from "motion/react";
|
|
15
4
|
import { useSpinLoop } from "../../lib/use-spin-loop";
|
|
16
5
|
import { cn } from "../../utils";
|
|
17
6
|
export function AiSpinner(props) {
|
|
18
|
-
|
|
19
|
-
return (_jsx(motion.svg,
|
|
7
|
+
const rotate = useSpinLoop();
|
|
8
|
+
return (_jsx(motion.svg, { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", ...props, className: cn("text-fuchsia-400 shrink-0", props.className), style: { rotate }, children: _jsx("path", { d: "M8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0ZM8.36621 3.70703C8.16407 3.5049 7.83594 3.50492 7.63379 3.70703L7.55469 3.78613C6.88523 5.5116 5.51162 6.88527 3.78613 7.55469L3.70703 7.63379C3.50492 7.83594 3.5049 8.16407 3.70703 8.36621L3.78516 8.44434C5.51093 9.11363 6.88511 10.4882 7.55469 12.2139L7.63379 12.293C7.83594 12.495 8.16409 12.495 8.36621 12.293L8.44434 12.2139C9.11375 10.4881 10.4881 9.11379 12.2139 8.44434L12.293 8.36621C12.495 8.16409 12.495 7.83594 12.293 7.63379L12.2139 7.55469C10.4882 6.88511 9.11363 5.51093 8.44434 3.78516L8.36621 3.70703Z", fill: "currentColor" }) }));
|
|
20
9
|
}
|
|
@@ -1,120 +1,55 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
50
3
|
import { useEffect } from "react";
|
|
51
4
|
import { motion, useMotionValue, useTransform, animate } from "motion/react";
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
export function TickLoader(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
var top = bottom - h;
|
|
66
|
-
return "polygon(-200px ".concat(h, "px, -200px 0px, ").concat(top, "px 0px, ").concat(bottom, "px ").concat(h, "px)");
|
|
5
|
+
const EASE = [0.4, 0, 0.2, 1];
|
|
6
|
+
const SHADOW = "M15.2918 2.29926C16.6018 0.989872 16.7476 -0.202438 19.2478 0.997505C21.4477 3.1975 21.7982 5.27919 20.0359 7.04145C18.2732 8.8042 11.0164 16.0571 11.0164 16.0571C10.7138 16.3594 10.3672 16.5907 9.99783 16.7534C9.98362 16.7598 9.96915 16.7657 9.95486 16.7719C9.93374 16.7809 9.91265 16.7898 9.89139 16.7983C8.6534 17.3099 7.16014 17.0381 6.14139 16.02L1.82986 11.7104C0.493112 10.3738 -0.70236 7.81776 0.796661 6.31782C2.11794 4.99749 5.23794 5.63193 6.57498 6.96821L8.59744 8.98969L15.2918 2.29926Z";
|
|
7
|
+
const HIGHLIGHT = "M1.67072 6.28847C2.57895 5.38124 4.1 5.38946 5.06915 6.3578L9.38068 10.6674C10.3497 11.6362 10.3579 13.157 9.45001 14.0648C8.54177 14.9726 7.01991 14.9642 6.0506 13.9955L1.73907 9.6869C0.769916 8.71801 0.762484 7.19629 1.67072 6.28847Z";
|
|
8
|
+
const OUTLINE = "M14.493 0.981968C15.803 -0.327434 17.927 -0.327208 19.2371 0.981968C20.5472 2.29142 20.548 4.41462 19.2381 5.72416L10.2186 14.7398C9.91937 15.0388 9.57645 15.2678 9.21173 15.4302C9.18163 15.4441 9.15134 15.4573 9.12091 15.4702C9.11442 15.4729 9.10788 15.4754 9.10138 15.4781C7.86174 15.9944 6.36366 15.7232 5.34259 14.7027L1.03204 10.3941C-0.304937 9.05752 -0.358541 6.90224 0.962708 5.58158C2.284 4.26139 4.43918 4.31566 5.77618 5.65189L7.79767 7.67337L14.493 0.981968ZM6.18146 10.7046C5.2624 11.6236 5.2624 13.1138 6.18146 14.0327C6.86358 14.7142 7.85953 14.8888 8.70392 14.5591C8.97701 14.4474 9.23166 14.2832 9.45001 14.065C10.3577 13.1571 10.3487 11.6362 9.3797 10.6675L7.79865 9.08744L6.18146 10.7046ZM5.06915 6.35794C4.09994 5.38933 2.57801 5.3811 1.66974 6.28861C0.761527 7.19644 0.769923 8.71815 1.73907 9.68705L4.492 12.438C4.47383 11.557 4.80099 10.67 5.47345 9.99759L7.09161 8.37943L5.06915 6.35794ZM18.5301 1.689C17.6106 0.770285 16.1204 0.770154 15.201 1.689L8.50568 8.38041L10.0867 9.96048C10.7687 10.6423 11.116 11.5372 11.118 12.4253L18.5301 5.01712C19.4495 4.09809 19.4494 2.60809 18.5301 1.689Z";
|
|
9
|
+
const FILL = "M15.2011 1.68833C16.1204 0.769644 17.6107 0.769931 18.5302 1.68833C19.4497 2.60741 19.4506 4.09836 18.5312 5.01743L9.51163 14.0331C8.59212 14.9518 7.10093 14.951 6.18155 14.0321C5.26256 13.1132 5.26269 11.6239 6.18155 10.7049L15.2011 1.68833Z";
|
|
10
|
+
export function TickLoader({ size = 24 }) {
|
|
11
|
+
const h = size * (18 / 22);
|
|
12
|
+
const yellowProgress = useMotionValue(0);
|
|
13
|
+
const whiteProgress = useMotionValue(0);
|
|
14
|
+
const makeClip = (p) => {
|
|
15
|
+
const bottom = -2 + p * (size + h + 6);
|
|
16
|
+
const top = bottom - h;
|
|
17
|
+
return `polygon(-200px ${h}px, -200px 0px, ${top}px 0px, ${bottom}px ${h}px)`;
|
|
67
18
|
};
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
useEffect(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
19
|
+
const yellowClip = useTransform(yellowProgress, makeClip);
|
|
20
|
+
const whiteClip = useTransform(whiteProgress, makeClip);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
let cancelled = false;
|
|
23
|
+
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
24
|
+
const wipe = (mv) => animate(mv, 1, { duration: 1, ease: EASE });
|
|
25
|
+
const loop = async () => {
|
|
26
|
+
while (!cancelled) {
|
|
27
|
+
yellowProgress.set(0);
|
|
28
|
+
whiteProgress.set(0);
|
|
29
|
+
await wipe(yellowProgress);
|
|
30
|
+
if (cancelled)
|
|
31
|
+
break;
|
|
32
|
+
await sleep(200);
|
|
33
|
+
if (cancelled)
|
|
34
|
+
break;
|
|
35
|
+
await wipe(whiteProgress);
|
|
36
|
+
if (cancelled)
|
|
37
|
+
break;
|
|
38
|
+
await sleep(200);
|
|
39
|
+
}
|
|
75
40
|
};
|
|
76
|
-
var loop = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
switch (_a.label) {
|
|
79
|
-
case 0:
|
|
80
|
-
if (!!cancelled) return [3 /*break*/, 5];
|
|
81
|
-
yellowProgress.set(0);
|
|
82
|
-
whiteProgress.set(0);
|
|
83
|
-
return [4 /*yield*/, wipe(yellowProgress)];
|
|
84
|
-
case 1:
|
|
85
|
-
_a.sent();
|
|
86
|
-
if (cancelled)
|
|
87
|
-
return [3 /*break*/, 5];
|
|
88
|
-
return [4 /*yield*/, sleep(200)];
|
|
89
|
-
case 2:
|
|
90
|
-
_a.sent();
|
|
91
|
-
if (cancelled)
|
|
92
|
-
return [3 /*break*/, 5];
|
|
93
|
-
return [4 /*yield*/, wipe(whiteProgress)];
|
|
94
|
-
case 3:
|
|
95
|
-
_a.sent();
|
|
96
|
-
if (cancelled)
|
|
97
|
-
return [3 /*break*/, 5];
|
|
98
|
-
return [4 /*yield*/, sleep(200)];
|
|
99
|
-
case 4:
|
|
100
|
-
_a.sent();
|
|
101
|
-
return [3 /*break*/, 0];
|
|
102
|
-
case 5: return [2 /*return*/];
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}); };
|
|
106
41
|
loop();
|
|
107
|
-
return
|
|
42
|
+
return () => {
|
|
108
43
|
cancelled = true;
|
|
109
44
|
};
|
|
110
45
|
}, [yellowProgress, whiteProgress]);
|
|
111
|
-
|
|
46
|
+
const svgProps = {
|
|
112
47
|
width: size,
|
|
113
48
|
height: h,
|
|
114
49
|
viewBox: "0 0 22 18",
|
|
115
50
|
fill: "none",
|
|
116
51
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return (_jsxs("div", { style: { position: "relative", width: size, height: h }, children: [_jsx("svg",
|
|
52
|
+
const abs = { position: "absolute", top: 0, left: 0 };
|
|
53
|
+
const wipeStyle = { ...abs, width: size, height: h };
|
|
54
|
+
return (_jsxs("div", { style: { position: "relative", width: size, height: h }, children: [_jsx("svg", { ...svgProps, style: abs, children: _jsx("path", { fill: "black", d: SHADOW }) }), _jsxs("svg", { ...svgProps, style: abs, children: [_jsx("path", { fill: "white", d: HIGHLIGHT }), _jsx("path", { className: "fill-bright opacity-30", d: HIGHLIGHT }), _jsx("path", { fill: "black", d: OUTLINE })] }), _jsx("svg", { ...svgProps, style: abs, children: _jsx("path", { fill: "white", d: FILL }) }), _jsx(motion.div, { style: { ...wipeStyle, clipPath: yellowClip }, children: _jsx("svg", { ...svgProps, children: _jsx("path", { className: "fill-bright", d: FILL }) }) }), _jsx(motion.div, { style: { ...wipeStyle, clipPath: whiteClip }, children: _jsx("svg", { ...svgProps, children: _jsx("path", { fill: "white", d: FILL }) }) })] }));
|
|
120
55
|
}
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
export
|
|
25
|
-
|
|
26
|
-
return (_jsx("div", __assign({ className: "border border-black h-12 print-no-break max-h-72 print:max-h-none ".concat(className), style: style }, props, { children: children })));
|
|
2
|
+
export const AnswerBox = ({ className, style, children, ...props }) => {
|
|
3
|
+
return (_jsx("div", { className: `border border-black h-12 print-no-break max-h-72 print:max-h-none ${className}`, style: style, ...props, children: children }));
|
|
27
4
|
};
|